#include<bits/stdc++.h>
using namespace std;
int n;
int a[100005];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    for(int i=1;i<=n;i++)
    {
        cin >> a[i];
    }
    sort(a+1,a+n+1);
    int l=1,r=2;
    while(r<=n)
    {
        if(a[r]>a[l])
        {
            l++;
            r++;
        }
        else
        {
            r++;
        }
    }
    cout << n-l+1;
    return 0;
}
